﻿using System;
namespace TLang.Ast
{
    using Values;

    public class Keyword : Node
    {
        public String id;


        public Keyword(String id, String file, int start, int end, int line, int col) : base(file, start, end, line, col)
        {
            this.id = id;
        }


        public Name asName()
        {
            return new Name(id, file, start, end, line, col);
        }


        public override Value Interp(Scope s)
        {
            Util.Abort(this, "keyword used as value");
            return null;
        }

        public override Value Typecheck(Scope s)
        {
            Util.Abort(this, "keyword used as value");
            return null;
        }


        public override String ToString()
        {
            return ":" + id;
        }
    }
}
